﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SevenDragon
{
    public class Chapter
    {
        string id;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }
        string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public Chapter(string nid, string nname)
        {
            this.name = nname;
            this.id = nid;
        }


        public override bool Equals(object obj)
        {
            if (obj is Chapter)
            {
                var nm = obj as Chapter;
                return (nm.Id == this.Id && nm.Name == this.Name);
            }

            return false;
        }

        public override int GetHashCode()
        {
            return string.Format("{0}{1}", this.Id, this.Name).GetHashCode();
        }
    }
}
 